import moment from "moment";

export const yyyy_mm_dd = 'yyyy-MM-DD'
export const yyyy_mm_dd_hh_mm_ss = 'yyyy-MM-DD HH:mm:ss'

export const formatDate = (date, format) => {
    return moment(date).format(format)
}

export const formatDateDefault = (date) => {
    return formatDate(date, yyyy_mm_dd)
}

export const formatTime = (time, format) => {
    return moment(time).format(format)
}

export const formatTimeDefault = (time) => {
    return formatTime(time, yyyy_mm_dd_hh_mm_ss)
}